<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="/yingji/Public/assets/css/bs3/dpl.css" rel="stylesheet" type="text/css" />
<link href="/yingji/Public/assets/css/bs3/bui.css" rel="stylesheet" type="text/css" />
<link href="/yingji/Public/assets/css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">

.title{
	margin:20px auto;
}

.controls{
	color:#fff;
}

.controls .con{
	width:100%;
	height:auto;
	line-height:30px;
	overflow:hidden;
	word-wrap: break-word; 
	word-break: break-all;
	color:#fff;
}

pre{
	width:100%;
	height:auto;
	line-height:30px;
	overflow:hidden;
	white-space: pre-wrap;
	word-break: break-all;
}

.tabs {
	width: 100%;
	height: 32px;
	margin-bottom:10px;
	margin-top:20px;
}

.tabs li {
	float:left;
	height:25px;
	line-height:25px;
	padding-right:18px;
}

</style>
<script type="text/javascript" src="/yingji/Public/assets/js/jquery-1.8.1.min.js"></script>

</head>
<body>
<script language="javascript">

var winID = null;
function openFullWindow(url,winname){
	var strFeatures = "left=0,screenX=0,top=0,screenY=0";  
	if (window.screen){
		var maxh = screen.availHeight-30;
		var maxw = screen.availWidth-10;
		strFeatures += ",height="+maxh;
		strFeatures += "innerHeight"+maxh;
		strFeatures += ",width="+maxw;
		strFeatures += "innerwidth"+maxw;
	}else{
		strFeatures +=",resizable"; 
	}
	winID = window.open(url,winname,strFeatures);
}

</script>
<div class="demo-content" style="margin-top:1%;">
	<div class="row" style="width:90%; margin:0px auto;">
		<div style="text-align:center"><h2><?php echo ($scripts["scriptsname"]); ?> - 基本信息</h2><hr></div>
        <div id="panel" class="" style="padding:10px;">
            <div class="control-group">
                <div class="controls title">
                    <label class="control-label"><h2>演练名称</h2></label>
                </div>
				<div class="controls"><?php echo ($scripts["scriptsname"]); ?></div>
            </div>
            
            <div class="control-group">
                <div class="controls title">
                	<label class="control-label"><h2>演练时间</h2></label>
				</div>
				<div class="controls"><?php echo (date("Y年m月d日H时i分",$record["start_time"])); ?> -- <?php echo (date("H时i分",$record["end_time"])); ?></div>
            </div>
            
            <div class="control-group title">
				<div class="controls">
                    <label class="control-label"><h2>参演部门</h2></label>
                    <div class="controls">
                        <div class="cons">
                            <ul class="tabs" id="tabs">
                                <?php if(is_array($department)): $i = 0; $__LIST__ = $department;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><?php echo ($vo); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
                            </ul>
                        </div>
                    </div>
				</div>
            </div>
            
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>演练范围</h2></label>
				</div>
 				<div class="controls">
                	<div class="con"><pre><?php echo ($scripts["range"]); ?></pre></div>
				</div>
			</div>
            
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>灾害介绍</h2></label>
				</div>
				<div class="controls"><div class="con"><pre><?php echo ($scripts["brief"]); ?></pre></div></div>
            </div>
            
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>演练目的</h2></label>
				</div>
				<div class="controls"><div class="con"><pre><?php echo ($scripts["goal"]); ?></pre></div></div>
            </div>
            
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>演练规则</h2></label>
				</div>
				<div class="controls"><div class="con"><pre><?php echo ($scripts["rules"]); ?></pre></div></div>
            </div>
		</div>
         
		<div style="text-align:center"><h2><?php echo ($scripts["scriptsname"]); ?> - 演练过程</h2><hr></div>
		<div id="panel" class="" style="padding:10px;">
        <?php if(is_array($scene)): $k = 0; $__LIST__ = $scene;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>场景<?php echo ($k); ?>：<?php echo ($vo["scenename"]); ?></h2></label>
				</div>
                <div class="controls" style="height:30px;"></div>
            </div>
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>场景描述</h2></label>
				</div>
                <div class="controls"><div class="con"><pre><?php echo ($vo["brief"]); ?></pre></div></div>
            </div>
            <div class="control-group">
				<div class="controls">
                    <label class="control-label"><h2>参与部门</h2></label>
				</div>
                <?php if(is_array($vo['department'])): $b = 0; $__LIST__ = $vo['department'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($b % 2 );++$b;?><div class="controls">
                    <label class="control-label"><h3 style="margin:5px 0px;"><?php echo ($v); ?></h2></label>
				</div>
                <div class="controls">
                    <?php if(is_array($hint)): $i = 0; $__LIST__ = $hint;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i; if($vo['id'] == $vs['hid'] and $b == $vs['did']): ?><div class="controls">
                    	<label class="control-label"><?php echo (date("H:i:s",$vs["start_time"])); ?> -- <?php echo (date("H:i:s",$vs["end_time"])); ?></label>
                    </div>
                    <audio controls src='/yingji/<?php echo ($vs["voice"]); ?>'></audio>
                    <div class="controls"><div class="con"><pre><?php echo ($vs["hint"]); ?></pre></div></div><?php endif; endforeach; endif; else: echo "" ;endif; ?>
				</div><?php endforeach; endif; else: echo "" ;endif; ?>
            </div><?php endforeach; endif; else: echo "" ;endif; ?>
		</div>
          
		<div style="text-align:center"><h2><?php echo ($scripts["scriptsname"]); ?> - 演练总结</h2><hr></div>
		<div id="panel" class="" style="padding:10px;">
            <?php if(is_array($report)): $i = 0; $__LIST__ = $report;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$d): $mod = ($i % 2 );++$i;?><div class="control-group">
                    <div class="controls">
                        <label class="control-label"><h3 style="margin:5px 0px;"><?php echo ($d["department"]); ?></h2></label>
                    </div>
                    <div class="controls">
                        <audio controls src='/yingji/<?php echo ($d["voice"]); ?>'></audio>
                        <div class="controls"><div class="con"><pre><?php echo ($d["hint"]); ?></pre></div></div>
                    </div>
                </div><?php endforeach; endif; else: echo "" ;endif; ?>
            <div class="control-group">
				<div class="controls title">
                    <label class="control-label"><h2>演练签到</h2></label>
				</div>
				<div class="control-group">
					<?php if(is_array($staff)): $s = 0; $__LIST__ = $staff;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ds): $mod = ($s % 2 );++$s;?><div class="controls title">
                            <label class="control-label"><h2><?php echo ($ds['department']); ?></h2></label>
                        </div>
                        <div class="controls">
                            <ul class="tabs" id="tabs">
                                <?php if(is_array($ds['staff'])): $i = 0; $__LIST__ = $ds['staff'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$m): $mod = ($i % 2 );++$i;?><li><?php echo ($m); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
                            </ul>
                        </div><?php endforeach; endif; else: echo "" ;endif; ?>
				</div>
			</div>

            <div class="control-group">
				<div class="controls title">
                    <label class="control-label"><h2>演练主控官</h2></label>
				</div>
				<div class="controls"><?php echo ($record["management"]); ?></div>
			</div>
            
            <div class="control-group">
				<div class="controls title">
                    <label class="control-label"><h2>演练记录人</h2></label>
				</div>
				<div class="controls"><?php echo ($record["recordman"]); ?></div>
            </div>
            
            <div class="control-group">
				<div class="controls title">
                    <label class="control-label"><h2>演练地点</h2></label>
				</div>
				<div class="controls"><?php echo ($record["address"]); ?></div>
            </div>
        </div>
	</div>
</div>
</body>
</html>